from google.appengine.ext import webapp
from google.appengine.api import users

class LogoutPage(webapp.RequestHandler):
    def get(self):
        user = users.get_current_user()

        if user:
            self.redirect(users.create_logout_url("/"))
        else:
            self.redirect("/")
